import { PrismaClient } from '@prisma/client'

const prisma = new PrismaClient()


// model Post {
//   id        Int     @id @default(autoincrement())
//   title     String
//   content   String?
//   tag       String  @default("")
//   published Boolean @default(false)
//   author    User    @relation(fields: [authorId], references: [id])
//   authorId  Int
// }

async function createPost() {
	await prisma.post.create({
		data: {
      title: '博客文章标题11',
			author: {}
		}
	})


	const posts = await prisma.post.findMany()
	console.log(posts)
}

createPost()
